package com.abaaba.project2.controller;

import com.abaaba.project2.bean.bo.AdminCollectBaseReq;
import com.abaaba.project2.bean.vo.AdminCollectVo;
import com.abaaba.project2.bean.vo.BaseRespVo;
import com.abaaba.project2.service.AdminCollectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/admin/collect")
public class AdminCollectController {
    @Autowired
    AdminCollectService adminCollectService;

    @RequestMapping("/list")
    public BaseRespVo getCollectList(AdminCollectBaseReq baseReq) {
        AdminCollectVo adminCollectVo = adminCollectService.getCollectList(baseReq.getPage(),
                baseReq.getLimit(), baseReq.getUserId(), baseReq.getValueId(),
                baseReq.getSort(), baseReq.getOrder());
        return BaseRespVo.ok(adminCollectVo);
    }
}
